﻿using AkazoNobel.Scheduler.StoreMasterData.Common;
using AkazoNobel.Scheduler.StoreMasterData.DataAccess.Model;
using System.Linq;
using Dapper;


namespace AkazoNobel.Scheduler.StoreMasterData.DataAccess.Service
{
    public static class StoreMasterService
    {
        public static StoreMaster GetStoreMasterDataByAuthId(string authId)
        {
            StoreMaster masterStore = new StoreMaster();
            using (var conn = SqlConnectionHelper.GetConnection(Constant.SMD_DB_NAME))
            {
                masterStore = conn.Query<StoreMaster>("SELECT * FROM t_smd_Store WHERE AuthID=@AuthID", new { AuthID = authId }).FirstOrDefault();
            }
            return masterStore;
        }
    }
}
